<template>
  <div class="boy">
    <h3>男人组件</h3>
    <div>金钱：{{ $store.state.money }}</div>
    <button @click="add">搬砖+1</button>
    <button @click="addmore(1000)">卖肾+1000</button>
  </div>
</template>

<script>
import { mapMutations, mapState } from "vuex";
export default {
  computed: {},
  methods: {
    ...mapMutations(["add", "addmore"]),
  },
};
</script>

<style>
button {
  padding: 5px;
  line-height: 30px;
  margin-left: 10px;
}
</style>
